/** @jsxImportSource @emotion/react */
import * as React from "react";
import {
  CCell, Cell, Table, TableBody, TableRow, Text
} from "customize-easy-ui-component";
import { DirectLink } from "../../../routing/Link";
import {俩列检验设备概况} from "../../park/views";
import {config设备概况} from "./orcBase";
import {检验结论GasC} from "../../gas/viewRes";

//整个结论报告页
export const 检验结论报告= ({ orc, rep,theme } : { orc: any, rep: any,theme:any}
) => {
  return <>
    <Text id={'Conclusion'} variant="h2" css={{textAlign:'center',
      "@media print": {pageBreakBefore: 'always',},
    }}>工业管道施工监督检验结论报告</Text>
    <Text css={{display: 'flex',flexDirection: 'row-reverse',marginRight: '2rem'
    }}>报告编号：{rep.isp?.no}</Text>
    <Table fixed={ ["16%","34%","16%","%"] } css={ {borderCollapse: 'collapse' } } tight  miniw={800}>
      <TableBody>
        <DirectLink  href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Survey#Survey`}>
          <TableRow><CCell scope="row" colSpan={4}>
              <Text variant="h5" css={{minHeight:'2rem',alignContent:'center'}}>工业管道建设基本情况</Text>
          </CCell></TableRow>
         {俩列检验设备概况({orc,rep, config:config设备概况})}
        </DirectLink>
        <DirectLink href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Conclusion#Conclusion`}>
          <TableRow>
            <CCell>监督检验开始日期</CCell>
            <CCell>{orc.检验日期1}</CCell>
            <CCell>监督检验结束日期</CCell>
            <CCell>{orc.检验日期}</CCell>
          </TableRow>
        </DirectLink>
      </TableBody>
    </Table>

    <Table  fixed={ ["11%","%"]  } css={ {borderCollapse: 'collapse' } } tight  miniw={800}>
        <TableBody>
          <DirectLink href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Conclusion#Conclusion`}>
          <TableRow >
            <CCell colSpan={2}>监 督 检 验 结 论</CCell>
          </TableRow>
          <TableRow>
            <CCell colSpan={2} css={ {textIndent: '1rem',} }>
              <Text>根据《压力管道监督检验规则》（TSG D7006-2020）、《压力管道安全技术监察规程——工业管道》（TSG D0001-2009）的规定，依据有关技术标准与设计图纸的要求，经监督检验，该工业管道施工监督检验
                &nbsp;结论为&nbsp;&nbsp;
                <Text css={{fontSize:'1.8rem'}}>{orc?.检验结论}</Text>&nbsp;。
              </Text>
            </CCell>
          </TableRow>
            <TableRow>
              <Cell split={true} colSpan={2}><div css={{display:'flex', justifyContent:'flex-end',minHeight: '3rem'}}>
                <Text css={{display:'inline-flex',flexDirection:'column-reverse', fontSize:'0.8rem'}}>监督检验详细内容附后</Text>
              </div></Cell>
            </TableRow>
            <TableRow >
              <CCell >参检人员</CCell>
              <CCell >{orc.参检人员}</CCell>
            </TableRow>
          </DirectLink>
        </TableBody>
    </Table>
    {检验结论GasC({theme, orc, rep})}
  </>;
};

